package com.zby.model.pojo;

import com.zby.model.enums.BlockEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.autotable.annotation.AutoColumn;
import org.dromara.autotable.annotation.AutoTable;
import org.dromara.autotable.annotation.mysql.MysqlTypeConstant;

import java.io.Serializable;

/**
 * @TableName content_blocks
 */
@EqualsAndHashCode(callSuper = true)
@Data
@AutoTable
public class ContentBlocks extends BasePojo {
    @Schema(description = "关联文章ID")
    @AutoColumn(comment = "关联文章ID")
    private Integer articleId;

    @Schema(description = "内容类型（h1/h2/paragraph/code等）")
    @AutoColumn(comment = "内容类型（h1/h2/paragraph/code等）")
    private BlockEnum blockType;

    @Schema(description = "内容层级（用于目录生成）")
    @AutoColumn(comment = "内容层级（用于目录生成）")
    private Integer depth;

    @Schema(description = "显示顺序")
    @AutoColumn(comment = "显示顺序")
    private Integer sortOrder;

    @Schema(description = "原始内容（Markdown格式）")
    @AutoColumn(type = MysqlTypeConstant.LONGTEXT, comment = "原始内容（Markdown格式）")
    private String rawContent;

    @Schema(description = "渲染后内容（HTML格式）")
    @AutoColumn(type = MysqlTypeConstant.LONGTEXT, comment = "渲染后内容（HTML格式）")
    private String renderedContent;
}
